<template>
	<view class="container bg-w">
		<view class="">
			<uni-search-bar :radius="100" @confirm="searchName" @cancel='cancelName' placeholder='请输入项目名称'></uni-search-bar>
			<view class="buildList">
				<uni-list>
				    <uni-list-item v-for="(item,index) in subprojectData" :key="index" showArrow link :to="'/pages/supervise/SubitemManagement/ProjectAudit/ProjectAudit?projectId='+item.projectId+'&subProjectId='+item.subProjectId+'&assessmentId='+item.assessmentId">
							<template slot='body'>
								<view class="buildList-body">
									<view class="color-6 flex"> <view>子项名称：</view><text class="wid-80 txtCut1">{{item.subProjectName}}</text></view>
									<view class="color-6 flex"> <view>状态：</view><text class="wid-80 txtCut1">{{ item.subProcessName}}（{{ item.auditStatusDesc }}）</text></view>
								</view>
							</template>
						</uni-list-item>
				</uni-list>
			</view>
			<!-- <view class="nodata">
				<text>暂无数据</text>
			</view> -->
		</view>
		
	</view>
</template>

<script>
	export default {
		props:['subprojectData'],
		data() {
			return {
			}
		},
		methods:{
			searchName(e){
				this.$emit('subprojectMethod',{'subProjectName':e.value,'pageNo': 1})
			},
			cancelName(){
				this.$emit('subprojectMethod',{'pageNo': 1})
			},
		}
	}
</script>

<style lang="less">
	.uni-searchbar{background-color: #F2F2F2;}
	.buildList{
		.buildList-body{
			width: 90%;
			>view:first-child{
				margin-bottom: 20rpx;
			}
			>view{
				> view{
					width: 200rpx;
					text-align-last: justify;
				}
			}
		}
	}
</style>
